package orderProcessingProcess.server;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;

import orderProcessingProcess.model.Customer;
import orderProcessingProcess.exceptions.faults.UnknownCustomerFault;
import orderProcessingProcess.exceptions.faults.CustomerNotAddedFault;
import orderProcessingProcess.exceptions.faults.CustomerNotUpdatedFault;

@WebService
public interface CustomerManagementServiceSOAP {
	
    @WebMethod(operationName="get_customer")
	@WebResult(name="customer") Customer 
		getCustomer(@WebParam(name="id") String id) 
			throws UnknownCustomerFault;
    
    @WebMethod(operationName="add_customer")
	void 
	    addCustomer(@WebParam(name="new_customer") Customer newCustomer)
		throws CustomerNotAddedFault; 

    @WebMethod(operationName="update_customer")
	void 
	    updateCustomer(@WebParam(name="id") String id, @WebParam(name="new_customer") Customer newCustomer)
		throws UnknownCustomerFault, CustomerNotUpdatedFault;     

    @WebMethod(operationName="delete_customer")
	void 
	    deleteCustomer(@WebParam(name="id") String id) 
		throws UnknownCustomerFault;
}
